/**************************************************************************
 * @doc PROTOCOL
 * @module GDPET.H|  
 * Include file for the host protcol table.
 *
 * Product     :   SoftPay 2000 (Global Payment Methodology).
 * <nl>Developer   :   
 * <nl>Notes       :
 *
 * @head3 Protocol Functions |
 * @index | Protocol
 * @end
 *
 * Copyright (c) 1996-2000 by VeriFone Inc. All rights reserved.
 * 
 * No part of this software may be used, stored, compiled, reproduced,
 * modified, transcribed, translated, transmitted, or transferred, in any form 
 * or by any means whether electronic, mechanical, magnetic, optical, 
 * or otherwise, without the express prior written permission of VeriFone, Inc.
 *
 * Revision History
 * ------------------------------------------------------------------------
 $Log: /SoftPay/SPK2SIM/Source/Protocol/gdpet.h $
 * 
 * 7     2/18/00 9:31a Page_k1
 * Add RETRY_STATE
 * 
 * 6     11/19/99 2:02p Kevin_v1
 * Removed DO_NOT_REMOVE define from project.h and removed project.h from
 * GD??? header files.
 * 
 * 5     11/01/99 6:28p Monique_b1
 * ------------------------------------------------------------------------
 ********************************************************************************/

#define STATE_1					-1
#define STATE_2					-2
#define STATE_3					-3
#define STATE_4					-4
#define STATE_5					-5
#define STATE_6					-6
#define STATE_7					-7
#define STATE_8					-8
#define STATE_9					-9
#define STATE_10				-10

#define SUBROUTINE_1			-21
#define SUBROUTINE_2			-22
#define SUBROUTINE_3			-23
#define SUBROUTINE_4			-24
#define SUBROUTINE_5			-25

#define END_STATE				-30
#define ERROR_STATE				-31
#define RETRY_STATE				-32
#define SETTLE_STATE			-50
#define TRAN_STATE				-51

/* Labels */
#define NAK_RECEIVED			-40
#define ENQ_RECEIVED			-41
#define NUL_RECEIVED			-42
#define RE_SEND					-43
#define STX_RECEIVED			-44

/* Frame Types */
#define STX_ETX_LRC				1
#define STX_ETB_LRC				2
#define SI_SO_LRC				3
#define STX_DL_ETX_LRC			4
#define SOH_ETX_LRC				5

/* Charatcers */
#define NUL 		0x00
#define SOH 		0x01
#define STX 		0x02
#define ETX 		0x03
#define EOT 		0x04
#define ENQ 		0x05
#define ACK 		0x06
#define BEL 		0x07
#define BS 			0x08
#define DLE 		0x10
#define DC1 		0x11
#define NAK 		0x15
#define SYN 		0x16
#define ETB 		0x17
#define CAN 		0x18
#define ESC 		0x1B
#define FS 			0x1C
#define US 			0x1F
#define SPACE 		0x20
#define FORMFEED 	0x0C
#define CR 			0x0D
#define LF 			0x0A
#define ANY         0xFF
#define PAD 		0x0FF

define pet BIN
{
   (short,  shState,		"")
   (short,  shStateFuncPtr,	"")
   (short,  shParameter,	"")
   (short,  shNextState,	"")
   (short,  shErrorState,	"")
   (short,  shTimeout,      "Wait in seconds")
}

